<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>项目列表  <{$smarty.const.WEB_NAME}></title>
	<link rel="stylesheet" type="text/css" href="./skin/<{$smarty.const.TPL_NAME}>/style.css" />
	<script type="text/javascript" src="./skin/<{$smarty.const.TPL_NAME}>/comm.js">	</script>
 </head>
 <body>
     
	 
<table width="100%" border="1" cellspacing="0" bordercolor="#cfcfcd" cellpadding="0" class="tableList" style="margin-bottom:3px;">
  <tr> 
    <th class="h1"><a href="?q=projectList">项目列表</a></th>
	<th width="200"><a href="?q=addProjectInfo">添加新项目</a></th>
  </tr>
</table>

	   <table width="100%" border="1" cellspacing="0" bordercolor="#cfcfcd" cellpadding="0" id="tableList">
         <tr class="tit">
           <th width="40" align="center">编号</th>
		   <th width="76">业务员</th>
           <th width="250" align="center">项目名称</th>
           <th width="140" align="center">类型</th>
           <th width="60" align="center">规模</th>
           <th width="70" align="center">创建时间</th>
		   <th>状态</th>
		   <th>操作</th>
         </tr>
		 <tr>
		 <{section name=list loop=$projectList}>
		 <tr>
		    <td><{$projectList[list].id}></td>
			<td>
			 <{if $smarty.session.type == 2}><a href="?q=projectList/<{$projectList[list].userId}>"><{$projectList[list].name}></a>
			 <{else}><{$projectList[list].name}>
			 <{/if}>
			</td>

		    <td><a href="?q=details/<{$projectList[list].id}>" title="<{$projectList[list].title}>">
			<{$projectList[list].title|truncate:50:".."}></a></td>
		    <td nowrap><{$projectList[list].resource}></td>
		    <td><{$projectList[list].num}></td>
		    <td width="70" style="text-indent:0.3em" ><{$projectList[list].recordTime}></td>		
			<td style="text-indent:0" width="136">
			   <table cellspacing="0" cellpadding="0" id="stateTable">
				<tr>		
				   <{assign var=tipUser value=$projectList[list].stateName }>
					<{if $projectList[list].state == 0}><td class="state_0" title="创建人：<{$tipUser}>"><{else}><td class="state_1"><{/if}>跟进</td>
					<{if $projectList[list].state == 0}><td><a href="#" onclick="stateSwitch('?q=stateSwitch/<{$projectList[list].id}>/1')">失败</a><{elseif $projectList[list].state == 1}><td class="state_0" title="切换人：<{$tipUser}>">失败<{else}><td class="state_1">失败<{/if}></td>
					<{if $projectList[list].state == 0}><td><a href="#" onclick="stateSwitch('?q=stateSwitch/<{$projectList[list].id}>/2')">成交</a><{elseif $projectList[list].state == 2}><td class="state_0" title="切换人：<{$tipUser}>">成交<{else}><td class="state_1">成交<{/if}></td>
					<{if $projectList[list].state == 3}><td class="state_0" title="切换人：<{$tipUser}>">售后<{elseif $projectList[list].state == 2}><td><a href="#" onclick="stateSwitch('?q=stateSwitch/<{$projectList[list].id}>/3')">售后</a><{else}><td class="state_1">售后<{/if}></td>
				</tr>
			   </table>			  
			</td>
			<td style="text-indent:0.5em">
			             <a href="?q=editProjectInfo/<{$projectList[list].id}>">修改</a>
			  <{if $smarty.session.type == 2}>
			             <a href="#" onclick="showWindow(<{$projectList[list].id}>)">分配</a>
			  			 <a href="#" onclick="deleteArticle('?q=removeProjectData/<{$projectList[list].id}>')">删除</a>			
			  <{/if}>
			</td>
			
		 </tr>
		 <{/section}>
       <{if $smarty.section.list.total == 0}>
	     <tr>
		   <td colspan="8"><h5 align="center">找不到数据</h5></td>
		 </td>
	   <{/if}>
		 <tr class="dedaultPage">
		   <td colspan="8" align="center">
		      <{$pageInfo}>
		   </td>
		 </tr>
       </table>



<script type="text/javascript">
<!--
function showWindow(id){
var str= showModalDialog('index.php?q=viewAssign/'+id,'widnow','dialogHeight: 250px; dialogWidth:220px');
}
//-->
</script>
 </body>
</html>
